1. Field Of the Invention
This invention relates to the field of computer operating environments, in particular the operation of operating system utilities for encoding and decoding data objects.
2. Prior Art
A computer requires an operating system in order to be functional. An operating system provides the logic, timing and protocols by which the various components of a computer system communicate. However, an operating system may not include all of the tools that a user may want to have in order to maintain their operating environment. Commonly, a user may utilize operating system utilities in order to provide desired functionality.
Operating system utilities generally operate in one of two modes; a mode requiring user intervention and a mode that is transparent to the user. Examples of utilities requiring user intervention are a storage media back-up program or data recovery utilities. Transparent utilities are performed without user intervention. They are automatically invoked in response to some event occurring, e.g. the starting of an application. Examples of transparent utilities include processor accelerators or memory managers.
Of course some utilities may operate in both modes. For example data compression utilities may be invoked by a user to compress a file; or may operate transparently where files are decompressed and compressed automatically when they are opened and closed.
Transparent utilities must have a means by which they recognize that they should be invoked. Using data compression as an example, whenever a user closes a file, i.e. indicates to the computer system that the file is no longer needed, that file is compressed in order to save storage on a storage medium such as a hard disk. The data compression utility will be invoked to initially compress and store the file. Next, when the file is to be re-used, the data compression utility will be invoked to decompress the file. Finally, when use of the file is complete, the data compression utility is invoked to re-compress the file (i.e., to compress the file again). Note that when the file is closed, the file may initially be stored as uncompressed and then recompressed. Several solutions will be discussed with respect to the data compression example.
It is first instructive to discuss the notion of foreground and background processing. Computer systems that support foreground and background processing are typically referred to as having multi-tasking capabilities. A task operating in the foreground is one in which the user is typically aware of. For example, a spreadsheet program being run by the user is in the foreground. Conversely, a task running in the background is one that is executing, while the user is performing some other task on the computer system (i.e. it is transparent to the user). An example of a background task is a print job.
A first solution to the problems of invoking the compression utility is to keep the compression utility always running in the background. Whenever a file is decompressed the compression utility is notified and the name of the file is added to the compression utility's list of open files. The compression utility periodically scans the list of decompressed files. When it detects that a decompressed file has been closed, it compresses the file.
There are several disadvantages to this approach. First the compression utility must always be running in the background. This degrades the overall performance of the computer system, and requires allocation of dedicated memory. Second, because the compression program is running in the background, background recompression of the file may interfere with the any foreground operation on the file. Finally, if the user is frequently switching back and forth between a compressed file and other files, the user may experience annoying time delays because of the repeated decompressions and recompressions of the file. These problems can cause unexpected delays and even corruption of the compressed file.
A second solution is to associate a file with the compression utility. In this manner, whenever the file is referenced, e.g. opened, the compression utility will be invoked. However, when the file is closed, there must be a means to notify the utility that a re-compression is required. Some known computer operating systems provide a means to do this, e.g. the MS/DOS.RTM. Operating System, available from the Microsoft Corporation of Redmond, Wash. Other known computer operating systems do not provide ready means, e.g. the PENPOINT.TM. Operating System, available from the Go Corporation of Foster City, Calif. MS/DOS and Microsoft are registered trademarks of Microsoft Corporation. PENPOINT is a trademark of Go Corporation.
A third way of integrating a compression utility into the operating system environment is to grant ownership of a resource to the compression utility. For example, a hard disk resource may be "owned" by the compression utility. Whenever that hard disk resource is accessed, the utility is automatically invoked. Unfortunately, this will typically require a high degree of integration of the utility into the operating system. Such integration may be difficult, if not impossible, for many operating system environments.
While various solutions exist, each has its drawbacks. Thus, it is a primary object of the present invention to provide a means by which a transparent utility may be integrated into an operating system environment that overcomes the foregoing drawbacks of the prior art.
It is also known that the utilities require their own temporary operating storage areas in order to perform their function. For example with respect to a data compression utility, temporary storage is required for the uncompressed data as well as the compressed data. If the temporary storage area is not available, the function of the utility cannot be performed. Moreover, if sometime during the execution of the utility, the required temporary storage is not available, the compression must be restarted. As various applications may be contending for the same pool of temporary storage, it is difficult to accurately estimate the storage that would be needed.
Thus, it is desirable to minimize the amount of temporary storage required to execute a utility.